<template>
	<view>
		<view class="" style="height: 200rpx;">
			
		</view>
		<!-- 登录 -->
		<view class="logo jcc aic">
		<image src="../../static/logo.png" mode=""></image>
		</view>
		<u-button type="primary" 
		@click="getUserProfile"
		:custom-style="customStyle">
			<view class="aic jcc">
				<u-icon name="weixin-fill" size="35" class="mx15"></u-icon>
				<view class="">
					微信用户快捷登录
				</view>
			</view>
		</u-button>
		<view class="my30">
			<u-button type="primary" :custom-style="customStyle" plain
			open-type="getPhoneNumber"
			@getphonenumber="getphonenumbers"
			>
				<view class="aic jcc">
					<image style="width: 40rpx;height: 40rpx;" src="../../static/phone.png" mode=""></image>
				<view style="margin-left: 10rpx;">
					手机号登录/注册
				</view>
				</view>
			</u-button>
			
		</view>
		<!-- 协议 -->
	<view class="agreement ">
		点击“注册/登录”即表示您同意
		<span class="llt-main-color">《用户服务协议》</span>
		、<span class="llt-main-color">《隐私政策》</span>和
		<span class="llt-main-color">《授权协议》</span>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:"",
				customStyle :{
						width: "600rpx"
					}
			};
		},
		methods:{
			getphonenumbers(e){
				console.log(e);
				this.$u.vuex("vuex_user_phone",18336465466)
				uni.navigateTo({
					url:'/pages/loginPhone/loginPhone'
				})
			},
			getUserProfile(){
				   uni.getUserProfile({
				      desc: '用于完善会员资料', // 声明获取用户个人信息后的用途，后续会展示在弹窗中，请谨慎填写
				      success: (res) => {
						  console.log(res);
						  this.userInfo = res.userInfo
				        this.setData({
				          userInfo: res.userInfo,
				          hasUserInfo: true
				        })
				      }
				    })
			}
		}
	}
</script>

<style lang="scss" scoped>
.logo{
margin: 150rpx 50rpx;
	image{
		width: 350rpx;
		height: 350rpx;
	}
}
.agreement{
	width: 600rpx;
	margin: 0 auto; 
	text-align: center;
	font-size: 25rpx;
	
}
</style>
